{ From user A Lumens, Project Sorting at Wed, Feb 16, 1994 10:53 AM}
{ System Variables with non-default values: }
Verbosity := 18
Typechecking := 1
Checking := 1
Saveoptions := 2
Savevalues := 0
{ Non-default Time SysVar value: }
Time := [0,1,2]
Attribute Reference
Project Sorting
Title: Sorting Example
Description: Example that shows how to sort an Index according to rank values (i.e., the ordering) and apply the sorted index to an array so that the array is also sorted.
Author: A Lumens
Date: Wed, Feb 9, 1994 10:40 AM
Saveauthor: A Lumens
Savedate: Wed, Feb 16, 1994 10:52 AM
Defaultsize: 48,20
Diagstate: 1,40,50,449,243,3
Windstate: 1,204,252
Fileinfo: 0,-5,2,Project Sorting,Sorting an Index
Getresource Pagesetup,1
Index Measures
Title: Measures
Description: A set of measures not in any particular order
Definition: ['A','B','C']
Location: 64,40
Nodesize: 48,20
Valuestate: 1,136,146,244,151,0,MIDM
Chance R
Title: R: ranks
Description: The ranks, or order from minimum to maximum, of array A.~
~
To obtain an ordering from maximum to minimum, use:~
Size(Measures) + 1 - Rank( A, Measures )
Definition: Rank(A, Measures)
Location: 192,40
Nodesize: 48,20
Defnstate: 1,460,528,416,303,0,MIDM
Valuestate: 1,120,130,247,155,0,MIDM
Chance A
Title: A
Description: An array indexed by Measures representing some intermediate result or outcome.
Definition: Table(Measures)(
5M,20M,1M)
Location: 64,128
Nodesize: 48,20
Defnstate: 1,91,421,416,303,0,MIDM
Valuestate: 1,14,230,298,193,1,MIDM
Index Sortedmeas
Title: Sorted Measures
Description: Measures sorted by the values in array A
Definition: Sortindex(R, Measures)
Location: 320,40
Nodesize: 48,20
Valuestate: 1,329,257,238,163,0,MIDM
Chance Sorteda
Title: Sorted A
Description: Array A rearranged using sorted measures.